<template>
  <el-dialog v-bind="$attrs" width="500px">
    <!-- <el-form :model="formData1">
      <el-form-item :label="groupName">
        <el-input v-model="formData1" placeholder="请输入" />
      </el-form-item>
    </el-form> -->
  </el-dialog>
</template>

<script>
// import SuperForm from '@/components/SuperForm'
import { updateFormItem } from './config'

export default {
  name: 'DeviceUpdate',
  // components: { SuperForm },
  props: {
    deviceCodeDisabled: {
      type: Boolean,
      default: false
    },
    formData: {
      type: Object,
      default: () => ({})
    },
    handleSubmit: {
      type: Function,
      default: () => {}
    }
  },
  data() {
    return {
      formData1: {
        groupName: {}
      },
      renderFormItem: [],
      formButtons: {
        isDialog: true,
        submitName: '提交',
        resetName: '取消',
        submitCallback: values => this.handleSubmit(values),
        resetCallback: () => this.$emit('update:visible', false)
      }
    }
  },
  watch: {
    deviceCodeDisabled: {
      handler: function() {
        this.renderFormItem = updateFormItem(this.deviceCodeDisabled)
      },
      immediate: true
    }
  }
}
</script>

<style lang="scss" scoped>
/deep/ .el-dialog__header {
  border-bottom: 1px solid #eaeaea;
}
</style>
